package train48days;

import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.Scanner;

public class 找出字符串中第一个只出现一次的字符 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        while (sc.hasNext()){
            String s = sc.nextLine();
            HashMap<Character,Integer> map = new LinkedHashMap<>();
            for (int i = 0; i < s.length(); i++) {
                if (!map.containsKey(s.charAt(i))){
                    map.put(s.charAt(i),1);
                }else {
                    map.put(s.charAt(i),map.get(s.charAt(i))+1);
                }
            }
            StringBuilder sb=new StringBuilder();
            for (char tmp : map.keySet()){
                if (map.get(tmp)==1){
                    sb.append(tmp);
                    break;
                }
            }
            if (sb.length()!=0)
            {
                System.out.println(sb);
            }else {
                System.out.println(-1);
            }
        }
    }
}
